<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="com.dinner.model.Consumer"%>
<%@page import="com.dinner.model.Seller"%>
<%@page import="java.util.List"%>
<%@page import="com.dinner.util.PageHelper" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
	List<Seller> l = (List<Seller>) request.getSession().getAttribute(
			"SellerList");
	String loginMessage = "";
	String sellerMessage = "";
	Object c = request.getSession().getAttribute("user");
	if( c!=null && c instanceof Consumer){
		loginMessage = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"189\">"
		+ "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"189\">"
		+ "<tbody><tr><td height=\"13\"><img height=\"25\" width=\"189\" alt=\"用户帐户\"src=\"images/left_myaccount.jpg\" />"
		+ "</td></tr><tr><td background=\"images/left_bg01.jpg\" align=\"center\" valign=\"top\">"
		+ "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tbody><tr>"
		+ "<td width=\"40%\"><div align=\"right\"><img height=\"10\" width=\"1\" src=\"images/kongxi_h16px.gif\" />"
		+ "</div></td><td width=\"60%\" colspan=\"2\"></td></tr><tr><td height=\"25\" align=\"right\">"
		+ " 欢 迎：</td><td align=\"center\" colspan=\"2\">" + ((Consumer)c).getConsumerID() +"</td>"
		+ "</tr><tr><td height=\"25\" align=\"center\" colspan=\"3\"><a class=\"TiShi\" href=\"userpage/activeOrderQuery.do\">查 看 新 订 单</a></td></tr>"
		+ "</tr><tr><td height=\"25\" align=\"center\" colspan=\"3\"><a class=\"TiShi\" href=\"userpage/completedOrderQuery.do\">查 看 旧 订 单</a></td></tr></tbody></table>"
		+ "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tbody><tr>"
		+ "<td align=\"center\" valign=\"middle\" colspan=\"2\">"
		+ "<a class=\"TiShi\" href=\"/account/GetPwd.jsp\">修改资料</a></td><td align=\"center\" valign=\"top\">"
		+ "<form action=\"/51Dinner/logout.do\" method=\"post\"><input type=\"image\" name=\"Submit\" src=\"images/logout.jpg\"/></form></td></tr><tr><td height=\"15\" align=\"right\" width=\"20%\" valign=\"middle\"></td>"
		+ "<td align=\"center\" width=\"40%\" valign=\"middle\"><img height=\"10\" width=\"1\" src=\"images/kongxi_h16px.gif\" />"
		+ "</td><td align=\"center\" width=\"40%\" valign=\"top\"></td>"
		+ "</tr></tbody></table></td></tr><tr><td height=\"5\"><img height=\"12\" width=\"189\" src=\"images/left_bg02.gif\" />"
		+ "</td></tr></tbody></table>";
	}
	else{
		loginMessage = "<form method=\"post\" action=\"userpage/userLogin.do\" >"
            + "<table width=\"189\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
            + "<tr><td height=\"13\"><img src=\"images/left_yh01.jpg\" alt=\"用户登入\" width=\"189\" height=\"25\" /></td>"
            + "</tr><tr><td align=\"center\" valign=\"top\" background=\"images/left_bg01.jpg\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
            + "<tr><td width=\"40%\"><div align=\"right\"><img src=\"images/kongxi_h16px.gif\" width=\"1\" height=\"10\" /></div></td>"
            + "<td width=\"60%\" colspan=\"2\">&nbsp;</td></tr><tr><td height=\"25\" align=\"right\">用户名：</td>"
            + "<td align=\"left\" colspan=\"2\"><input name=\"userID\" id=\"userID\" type=\"text\" size=\"10\" /></td>"
            + "</tr><tr><td height=\"25\" align=\"right\">密　码：</td>"
            + "<td align=\"left\" colspan=\"2\"><input name=\"password\" id=\"password\" type=\"password\" size=\"10\" /></td>"
            + "</tr><tr><td height=\"25\" align=\"right\">方　式：</td><td align=\"left\" colspan=\"2\"><select name=\"type\" id=\"type\" size=\"1\">"
            + "<option value=\"0\">买家</option><option value=\"1\">卖家</option> <option value=\"2\">管理员</option></select></td>"
            + "</tr><tr><td height=\"8\" colspan=\"3\" align=\"right\" valign=\"middle\"><img src=\"images/kongxi_h16px.gif\" width=\"1\" height=\"8\" /></td>"
            + "</tr></table><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
            + "<tr><td align=\"right\" valign=\"middle\"><a href=\"account/regist.jsp\" class=\"TiShi\">卖家注册</a></td>"
            + "<td align=\"center\" valign=\"middle\"><a href=\"account/getPwd.jsp\" class=\"TiShi\">忘记密码</a></td>"
            + "<td align=\"center\" valign=\"top\"><input type=\"image\" src=\"images/left_dr_an.jpg\" name=\"Submit\" /></td>"
            + "</tr><tr><td width=\"33%\" height=\"10\" align=\"right\" valign=\"middle\"></td>"
            + "<td width=\"33%\" align=\"center\" valign=\"middle\"><img src=\"images/kongxi_h16px.gif\" width=\"1\" height=\"10\" /></td>"
            + "<td width=\"34%\" align=\"center\" valign=\"top\"></td></tr>"
            + "</table></td></tr><tr><td height=\"5\"><img src=\"images/left_bg02.gif\" width=\"189\" height=\"12\" /></td>"
            + "</tr></table></form>";
	}
	if(l != null){
		for(Seller s : l){
			sellerMessage += "<tr><td width=\"7%\"></td>"
				+ "<td align=\"left\" width=\"80%\"><a class=\"midSPMC\" href=\""+"userpage/menuTypePage.do?sellerID="+s.getSellerID()+"\" >"+s.getSellerName()+"</a><img src=\"images/hot.gif\" alt=\"热销\" /></td>"
				+ "<td align=\"left\"><img src=\"images/open.gif\" alt=\"营业中\" /></td>"
				+ "</tr><tr><td></td><td align=\"left\" class=\"midSPMC STYLE1 STYLE2\">"+s.getDescription()+"</td>"
       			+ "<td></td></tr>"
       			+ "<tr><td colspan=\"3\"><hr /></td></tr>";
        }
	}
 %>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<link rel="shortcut icon" href="/favicon.ico" />
		<link rel="Bookmark" href="/favicon.ico" />
		<title>51Dinner</title>
		<link href="css/all.css" rel="stylesheet" type="text/css" />
		<script src="js/main.js" type="text/javascript"></script>
		<script src="js/net.js" type="text/javascript"></script>
		<script src="js/AddtoCart.js" type="text/javascript"></script>
		<style type="text/css">
<!--
#toubiao {
	BORDER-BOTTOM: #ddd 1px solid;
	BORDER-top: #F0F0F0 1px solid;
	margin-bottom: 5px;
}

.STYLE1 {
	color: #666666
}

.STYLE2 {
	font-size: 12px
}
-->
</style>
	</head>
	<body>
		<center>
			<table width="766" border="0" align="center" cellpadding="0"
				cellspacing="0">
				<tr>
					<td align="center">
						<table width="766" border="0" align="center" cellpadding="0"
							cellspacing="0" bordercolor="#990033">
							<tr>
								<td>
									<img name="TOP_r5_c1" src="images/TOP_r5_c1.jpg" width="25"
										height="58" border="0" id="TOP_r5_c1" alt="" />
								</td>
								<td background="images/menu_xia_bg.jpg">
									<table width="100%" height="58" border="0" cellspacing="0"
										cellpadding="0">
										<tr>
											<td width="691">
												<table width="100%" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td colspan="2" height="3"></td>
													</tr>
													<tr>
														<td width="90%">
															<div align="center">
																<a class="MenuXia" href="/51Dinner/">&nbsp;首页&nbsp;</a>|
																<a class="MenuXia" href="/help/help.jsp?sn=help_02"
																	target="_blank">我的页面</a> |
																<a class="MenuXia" href="/help/help.jsp?sn=help_03"
																	target="_blank">订餐搜索</a> |
																<a class="MenuXia"
																	href="javascript:window.external.AddFavorite('http://www.51dinner.com','51Dinner网'); ">收藏本站</a>
															</div>
														</td>
														<td width="10%">
															&nbsp;
														</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td>
												<script language=JavaScript>
	 function search(){
		location.assign("product/Prolist.jsp?key=----"+document.getElementById("searchtext").value+"-"
		                 +(document.getElementById ("searchsel").selectedIndex==0?"0-":"-0")+"----");
	 }
	</script>
												<form name="top001"
													onsubmit="javascript:search();return false;">
													<table class="shousuo" width="100%" border="0"
														cellspacing="0" cellpadding="0">
														<tr>
															<td width="5%"></td>
															<td width="15%">
																<div align="left">
																	搜索类型：
																</div>
															</td>
															<td width="30%">
																<select name="searchsel" id="searchsel">
																	<option value="0">
																		搜索所有商品
																	</option>
																	<option value="1">
																		搜索所有卖家
																	</option>
																</select>
															</td>
															<td width="25%">
																<input name="searchtext" id="searchtext" type="text"
																	size="15" />
															</td>
															<td width="1%">
																&nbsp;
															</td>
															<td width="7%">
																<input class="SousAn" type="button" onclick="search();"
																	value="搜 索" height="150" />
															</td>
															<td>
																&nbsp;
															</td>
														</tr>
													</table>
												</form>
											</td>
										</tr>
									</table>
								</td>
								<td align="right">
									<img src="images/TOP_r5_c5.jpg" width="267" height="58" />
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td align="center">
						<table width="600" align="center" border="0" cellspacing="4"
							cellpadding="0">
							<tr>
								<td align="left">
									你的位置：
									<a href="/51Dinner/" class="MenuT">首页</a>
									<br />
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<table width="766" valign="top" align="center" border="0"
				cellspacing="0" cellpadding="0">
				<tr>
					<td width="189" align="left" valign="top">
						<%=loginMessage %>
						<table width="87%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td height="13">
									<img src="images/left_sp.jpg" width="189" height="25" />
								</td>
							</tr>
							<tr>
								<td align="center" valign="top"
									background="images/left_bg01.jpg">
									<table width="185" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="24" colspan="2" valign="middle"
												background="images/left_tb_bg.jpg" align="center">
												<script type="text/javascript">
				<!--
				var focus_width=186
				var focus_height=143
				var text_height=0
				var swf_height = focus_height+text_height
				var pics='ad/20060828135557406.jpg|ad/35ce9f3e39dbd2f1838b1374.jpg|ad/D035E94F678832818EF18.jpg'
				var links='||'
				var texts='||'
				document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
				document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="ad/viewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#DADADA">');
				document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
				document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
				document.write('<embed src="ad/viewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');		
				document.write('</object>');
				//-->
			</script>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td height="5">
									<img src="images/left_bg02.gif" width="189" height="12" />
								</td>
							</tr>
						</table>
					</td>
					<td width="577" valign="top" align="center">
						<table width="563" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" valign="top">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="25" align="left"
												background="images/mid_bg_blue.gif">
												<marquee class="myColor">
												新版网站试运行,欢迎大家进行测评
												</marquee>
											</td>
										</tr>
										<tr>
											<td height="10">
												<img src="images/mid_bg_botad.gif" width="563" height="10" />
											</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="24" valign="middle">
												<div align="center">
													<table width="99.6%" height="24" border="0" cellpadding="0"
														cellspacing="0" bgcolor="#e1f2ff"
														style="border: 1px solid #e0e0e0"
														background="images/bg_blue_biaoti.gif">
														<tr>
															<td width="5%" align="center" valign="middle">
																<img src="images/bttubiao.jpg" width="11" height="11" />
															</td>
															<td width="70%" align="left" valign="middle">
																<strong
																	style="font-size: 14px; color: #FF5500; letter-spacing: 1px">在线店铺</strong>
															</td>
															<td width="2%">
																&nbsp;
															</td>
														</tr>
													</table>
												</div>
											</td>
										</tr>
										<tr>
											<td background="images/mid_bg_line.gif">
												<table class="midSPMC" width="100%" border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td colspan="3">
															<hr />
														</td>
													</tr>
													<%=sellerMessage %>
													<tr>
														<td align="right" colspan="3">
															<%
																PageHelper p = (PageHelper)request.getAttribute("pageInfo");
																if(p == null)
																	p = new PageHelper();
																String pageShow = "";
																pageShow +="<a href=\"sellerPage.do?pageNum=1\">首页</a> ";
																for(int i=p.getCurrentPage()-4; i<=p.getCurrentPage()+4; i++){
																	if(i>0 && i<=p.getTotalPage()){
																		if( i != p.getCurrentPage() )
																			pageShow +="<a href=\"sellerPage.do?pageNum="+i+"\">"+i+"</a> ";
																		else
																			pageShow +=p.getCurrentPage()+" ";
																	}
																}
																pageShow +="<a href=\"sellerPage.do?pageNum="+p.getTotalPage()+"\">尾页</a> ";
															 %>
															 <%=pageShow %>
														</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td height="18">
												<img src="images/mid_bg_bot.gif" width="563" height="18" />
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<p>
				&nbsp;
			</p>

			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr align="center">
					<td height="12" valign="top">
						Copyright(C)2007-2008 51Dinner
						<script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
						<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2311325-1");
pageTracker._trackPageview();
</script>
					</td>
				</tr>
			</table>
		</center>
		<style>
#gNav {
	height: 45px;
	position: fixed !important;
	position: absolute;
	top: 50%;
	right: 3px;
	z-index: 9999;
	width: 110px;
	background-color: #ffffff
}

.gNav {
	width: 110px;
	height: 45px;
	overflow: hidden;
	position: relative;
	margin-left: 0;
}

.tbstyle {
	border-color: #ddd;
	border: 1px solid
}
</style>
		<map name="Map" id="Map">
			<area shape="rect" coords="166,4,221,22"
				href="product/Prolist.jsp?key=----------0" />
		</map>
		<map name="Map2" id="Map2">
			<area shape="rect" coords="169,3,220,22"
				href="product/Prolist.jsp?key=------0----" />
		</map>
		<map name="Map3" id="Map3">
			<area shape="rect" coords="131,3,185,23" href="emag/emag.jsp" />
		</map>
		<map name="Map4" id="Map4">
			<area shape="rect" coords="131,3,184,23" href="#" />
		</map>
	</body>
</html>
